import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Map from "../views/map.vue";
import rainAggregate from "../views/rainAggregate.vue";
import lockStation from "../views/lockStation.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home/map",
  },
  {
    path: "/home",
    component: Home,
    children: [
      { path: "/home/map", component: Map },
      { path: "/home/rainAggregate", component: rainAggregate },
      { path: "/home/lockStation", component: lockStation },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
